home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNSVCU.IN_ / oemnsvcu.inf
INI File  |  1996-07-12  |  11KB  |  349 lines

  1. [Identification]
  2.     OptionType = NetTcpip
  3. [Options]
  4.     TCPIPCU
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. SoftwareType = "service"
  10. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  11. ProductTCPIPCUName        = "TcpipCU"
  12. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  13. [GeneralConstants]
  14. UtilityInf       = "UTILITY.INF"
  15. subroutineinf    = "SUBROUTN.INF"
  16. Exit_Code        = 0
  17. BillboardVisible = 0
  18. from      = ""
  19. to        = ""
  20. ExitCodeOk     = 0
  21. ExitCodeCancel = 1
  22. ExitCodeFatal  = 2
  23. KeyNull         = ""
  24. MAXIMUM_ALLOWED   = 33554432
  25. SERVICE_NO_CHANGE = 4294967295
  26. RegistryErrorIndex = NO_ERROR
  27. KeyProduct      = ""
  28. KeyParameters   = ""
  29. TRUE            = 1
  30. FALSE           = 0
  31. NoTitle         = 0
  32. ExitState   = "Active"
  33. OldVersionExisted = $(FALSE)
  34. [date]
  35.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  36. [Identify]
  37.     read-syms Identification
  38.     set Status     = STATUS_SUCCESSFUL
  39.     set Identifier = $(OptionType)
  40.     set Media      = #("Source Media Descriptions", 1, 1)
  41.     Return $(Status) $(Identifier) $(Media)
  42. [ReturnOptions]
  43.     set Status        = STATUS_FAILED
  44.     set OptionList     = {}
  45.     set OptionTextList = {}
  46.     set LanguageList = ^(LanguagesSupported, 1)
  47.     Ifcontains(i) $($0) in $(LanguageList)
  48.         goto returnoptions
  49.     else
  50.         set Status = STATUS_NOLANGUAGE
  51.         goto finish_ReturnOptions
  52.     endif
  53. returnoptions = +
  54.     set OptionList     = ^(Options, 1)
  55.     set OptionTextList = ^(OptionsText$($0), 1)
  56.     set Status         = STATUS_SUCCESSFUL
  57. finish_ReturnOptions = +
  58.     Return $(Status) $(OptionList) $(OptionTextList)
  59. [InstallOption]
  60.     set Option   = $($1)
  61.     set SrcDir   = $($2)
  62.     set AddCopy  = $($3)
  63.     set DoCopy   = $($4)
  64.     set DoConfig = $($5)
  65.     set LanguageList = ^(LanguagesSupported, 1)
  66.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  67.         Return STATUS_NOLANGUAGE
  68.     endif
  69.     Debug-Output "OEMNSVCU.INF: STF_CWDIR is: "$(!STF_CWDIR)
  70.     Debug-Output "OEMNSVCU.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  71.     set-subst LF = "\n"
  72.     read-syms GeneralConstants
  73.     read-syms FileConstants
  74.     read-syms DialogConstants$(!STF_LANGUAGE)
  75.     ifstr(i) $(!NTN_Origination) == "NCPA"
  76.         set Continue = $(OK)
  77.     endif
  78.     read-syms FileConstants$(!STF_LANGUAGE)
  79.     detect date
  80.     set-title  $(FunctionTitle)
  81.     set to   = Begin
  82.     set from = Begin
  83.     set CommonStatus = STATUS_SUCCESSFUL
  84.     EndWait
  85. Begin = +
  86.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  87.         set StartLabel = removeadapter
  88.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  89.         set StartLabel = UpgradeSoftware
  90.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  91.         set StartLabel = configureadapter
  92.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  93.             Debug-Output "Cannot configure the software."
  94.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  95.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  96.                 Debug-Output "ShellCode error: cannot get an error string."
  97.                 goto ShellCodeError
  98.             endif
  99.             set Error = $($R0)
  100.             set from = end
  101.             set to = end
  102.             goto nonfatalinfo
  103.         endif
  104.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  105.         set StartLabel = bindingadapter
  106.     else
  107.         set StartLabel = installadapter
  108.         set OEM_ABANDON_SOFTWARE = {}
  109.         set OEM_ABANDON_OPTIONS = {}
  110.     endif
  111.     set from = $(fatal)
  112.     set to = $(fatal)
  113.     goto $(StartLabel)
  114. installadapter = +
  115.     ifstr(i) $(!NTN_InstallMode) == "install"
  116.         Debug-Output "OEMNSVCU.INF: installadapter: installing [Install-Option]"
  117.         install "Install-Option"
  118.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  119.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  120.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  121.                goto ShellCodeError
  122.            endif
  123.            set Error = $($R0)
  124.            goto fatal
  125.         endif
  126.     endif
  127.     set OEM_ABANDON_ON  = TRUE
  128.     StartWait
  129.     Shell $(UtilityInf) InstallSoftwareProduct $(Manufacturer) $(ProductTCPIPCUName) $(STF_CONTEXTINFNAME)
  130.     set VerKey = $($R1)
  131.     set NetRuleKey = $($R2)
  132.     Shell  $(UtilityInf), AddValueList, $(VerKey), {{Hidden,0,$(!REG_VT_DWORD),1}}
  133.     Shell  $(UtilityInf), AddValueList, $(VerKey), {{SoftwareType,0,$(!REG_VT_SZ),$(SoftwareType)}}
  134.     Shell  $(UtilityInf), AddValueList, $(VerKey), {{Title,0,$(!REG_VT_SZ),$(ProductTCPIPCUTitle)}}
  135.     Shell  $(UtilityInf), AddValueList, $(NetRuleKey), {{InfOption,0,$(!REG_VT_SZ),"TCPIPCU"}}
  136.     CloseRegKey $(VerKey)
  137.     CloseRegKey $(NetRuleKey)
  138.     ifstr(i) $(!STF_INSTALL_TYPE) != "SETUPBOOTED"
  139.         Shell "" AddTelnet
  140.     endif
  141.     EndWait
  142.     goto successful
  143. configureadapter = +
  144.     goto end
  145. bindingadapter =+
  146.     goto end
  147. removeadapter = +
  148.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\"$(Manufacturer) $(MAXIMUM_ALLOWED) ProductKey
  149.     ifstr(i) $(ProductKey) != ""
  150.         DeleteRegTree $(ProductKey) $(ProductTCPIPCUName)
  151.     endif
  152.     goto end
  153. UpgradeSoftware = +
  154.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  155.     Ifstr $(KeyProduct) != $(KeyNull)
  156.         install "Install-Update"
  157.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  158.             goto fatal
  159.         endif
  160.         SetRegValue $(KeyProduct) {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)}
  161.         SetRegValue $(KeyProduct) {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductTCPIPCUTitle)}
  162.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  163.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  164.         CloseRegKey $(KeyProduct)
  165.     else
  166.         goto fatalregistry
  167.     endif
  168.     goto end
  169. successful = +
  170.     goto end
  171. infomsg =+
  172.    read-syms InfoDlg
  173.    ui start "Warning"
  174.    set CommonStatus = STATUS_USERCANCEL
  175.    goto end
  176. warning = +
  177.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  178.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  179.         goto ShellCodeError
  180.     endif
  181.     ifstr(i) $($R1) == "OK"
  182.         goto $(to)
  183.     else-ifstr(i) $($R1) == "CANCEL"
  184.         goto $(from)
  185.     else
  186.         goto "end"
  187.     endif
  188. nonfatalinfo = +
  189.     Set CommonStatus = STATUS_USERCANCEL
  190.     Set Severity = STATUS
  191.     goto nonfatalmsg
  192. nonfatal = +
  193.     Set Severity = NONFATAL
  194.     goto nonfatalmsg
  195. nonfatalmsg = +
  196.     ifstr(i) $(Error) == ""
  197.         Set Severity = NONFATAL
  198.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  199.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.             goto ShellCodeError
  201.         endif
  202.         set Error = $($R0)
  203.     endif
  204.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  205.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  206.         goto ShellCodeError
  207.     endif
  208.     ifstr(i) $($R1) == "OK"
  209.         goto $(from)
  210.     else
  211.         goto "end"
  212.     endif
  213. fatalregistry = +
  214.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  215.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  216.         goto ShellCodeError
  217.     endif
  218.     set Error = $($R0)
  219.     goto fatal
  220. fatal = +
  221.     ifstr(i) $(Error) == ""
  222.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  223.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  224.             goto ShellCodeError
  225.         endif
  226.         set Error = $($R0)
  227.     endif
  228.     Ifint $(BillboardVisible) != 0
  229.         Shell "subroutn.inf" PopBillboard
  230.         Set BillboardVisible = 0
  231.     Endif
  232.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  233.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.         goto ShellCodeError
  235.     endif
  236.    goto setfailed
  237. ShellCodeError = +
  238.     set DlgType      = "MessageBox"
  239.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  240.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  241.     set STF_MB_TYPE  = 1
  242.     set STF_MB_ICON  = 3
  243.     set STF_MB_DEF   = 1
  244.     ui start "Error Message"
  245.     goto setfailed
  246. setfailed = +
  247.     set CommonStatus = STATUS_FAILED
  248.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  249.         set OEM_ABANDON_ON = FALSE
  250.         goto removeadapter
  251.     endif
  252.     goto end
  253. end = +
  254.     goto term
  255. term = +
  256.     Return $(CommonStatus)
  257. [GetFilesSize]
  258.     set FileSizeList = ^(Files-TCPIPEXE,3)
  259.     set TotalSize = 0
  260.     ForListDo $(FileSizeList)
  261.         Split-String $($) "=" SplitString
  262.         set Size = *($(SplitString),3)
  263.         set-add TotalSize = $(TotalSize) $(Size)
  264.     EndForListDo
  265.     set-div SizeInK = $(TotalSize) 1024
  266.     return $(SizeInK)
  267. [Install-Option]
  268.     set STF_VITAL = ""
  269.     Debug-Output "OEMNSVCU.INF: Copy Single File "$(SrcDir)\telnet.exe" to "$(!STF_WINDOWSSYSPATH)\telnet.exe
  270.     LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\telnet.exe $(!STF_WINDOWSSYSPATH)\telnet.exe
  271.     ifstr(i) $(AddCopy) == "YES"
  272.         AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  273.     endif
  274.     ifstr(i) $(DoCopy) == "YES"
  275.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  276.        Debug-Output "OEMNSVCU.INF: *** CopyFilesInCopyList [2]"
  277.        CopyFilesInCopyList
  278.     endif
  279.     ifstr(i) $(DoConfig) == "YES"
  280.     endif
  281.     Exit
  282. [Install-Update]
  283.    set STF_VITAL        = ""
  284.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  285.    AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  286.    Debug-Output "OEMNSVCU.INF: *** CopyFilesInCopyList [3]"
  287.    Exit
  288. [AddTelnet]
  289.     read-syms FileConstants$(!STF_LANGUAGE)
  290.     read-syms GeneralConstants
  291.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\TcpipCU" $(MAXIMUM_ALLOWED) ProductKey
  292.     ifstr(i) $(ProductKey) != ""
  293.         install "Install-Telnet"
  294.         CloseRegKey $(ProductKey)
  295.     endif
  296.     return
  297. [Install-Telnet]
  298.     CreateProgManGroup $(GroupName), ""
  299.     RemoveProgManItem $(GroupName), $(IconName)
  300.     CreateProgManItem $(GroupName), $(IconName), telnet.exe, telnet.exe, ""
  301.     ShowProgManGroup $(GroupName), 6
  302.     exit
  303. [Source Media Descriptions]
  304.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  305. [Signature]
  306.     FileType = MICROSOFT_FILE
  307. [GetSignature]
  308.     read-syms Signature
  309.     return $(FileType)
  310. [ProductType]
  311. STF_PRODUCT  = LanmanNT
  312. STF_PLATFORM = I386
  313. [Files-Inf]
  314. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  315. [Files-TCPIPEXE]
  316. 1,FINGER.EXE , SIZE=999
  317. 1,FTP.EXE , SIZE=999
  318. 1,NSLOOKUP.EXE , SIZE=999
  319. 1,RCP.EXE , SIZE=999
  320. 1,REXEC.EXE , SIZE=999
  321. 1,RSH.EXE , SIZE=999
  322. 1,TELNET.CNT , SIZE=895
  323. 1,TELNET.EXE , SIZE=999
  324. 1,TELNET.HLP , SIZE=17004
  325. 1,TFTP.EXE , SIZE=999
  326. [LanguagesSupported]
  327.     ENG
  328. [OptionsTextENG]
  329.     TCPIPCU = "TCP/IP Utilities"
  330. [FileConstantsENG]
  331. ProductTCPIPCUTitle = "TCP/IP Utilities"
  332. ProCaption   = "Windows NT Setup"
  333. ProCancel    = "Cancel"
  334. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  335.                "Are you sure you want to cancel copying files?"
  336. ProCancelCap = "Network Setup Message"
  337. ProText1     = "Copying:"
  338. ProText2     = "To:"
  339. GroupName    = "Accessories"
  340. IconName     = "Telnet"
  341. [DialogConstantsENG]
  342. Help        = "&Help"
  343. Exit        = "Cancel"
  344. OK          = "OK"
  345. HelpContext = ""
  346. Continue    = "Continue"
  347. Cancel      = "Cancel"
  348. [FileDependentDlgENG]
  349.